package com.stg.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.stg.bean.Msg;
import com.stg.bean.User;
import com.stg.service.RegiserValidateService;

@Controller
@RequestMapping("/email")
public class EmailController {

	@Resource
	private Msg msg;
	
	
	@Resource
	private RegiserValidateService regiserValidateService;
	
	@RequestMapping(value="/EmailSend",method=RequestMethod.POST)
	public @ResponseBody Msg EmailSend(Model model,User user){
		regiserValidateService.processregister(user);
		msg.setMsg("成功激活邮件验证码");
		return msg;
	}
}
